package o;

import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.FileDescriptor;
import java.io.PrintWriter;

public class li<D> {
    boolean ʽ;
    boolean ˊ;
    a<D> ˋ;
    int ˎ;
    boolean ˏ;
    boolean ॱ;
    boolean ᐝ;

    public interface a<D> {
    }

    @MainThread
    public void ˏ(@NonNull a<D> aVar) {
        if (this.ˋ == null) {
            throw new IllegalStateException("No listener register");
        } else if (this.ˋ != aVar) {
            throw new IllegalArgumentException("Attempting to unregister the wrong listener");
        } else {
            this.ˋ = null;
        }
    }

    @MainThread
    public final void ॱ() {
        this.ॱ = true;
        this.ˊ = false;
        this.ˏ = false;
        ˊ();
    }

    @MainThread
    protected void ˊ() {
    }

    @MainThread
    public boolean ˋ() {
        return ˏ();
    }

    @MainThread
    protected boolean ˏ() {
        return false;
    }

    @MainThread
    public void ˎ() {
        this.ॱ = false;
        ʼ();
    }

    @MainThread
    protected void ʼ() {
    }

    @MainThread
    public void ॱॱ() {
        this.ˏ = true;
        ʽ();
    }

    @MainThread
    protected void ʽ() {
    }

    @MainThread
    public void ᐝ() {
        ʻ();
        this.ˊ = true;
        this.ॱ = false;
        this.ˏ = false;
        this.ᐝ = false;
        this.ʽ = false;
    }

    @MainThread
    protected void ʻ() {
    }

    @NonNull
    public String ˊ(@Nullable D d) {
        StringBuilder stringBuilder = new StringBuilder(64);
        gx.ˎ(d, stringBuilder);
        stringBuilder.append("}");
        return stringBuilder.toString();
    }

    public String toString() {
        StringBuilder stringBuilder = new StringBuilder(64);
        gx.ˎ(this, stringBuilder);
        stringBuilder.append(" id=");
        stringBuilder.append(this.ˎ);
        stringBuilder.append("}");
        return stringBuilder.toString();
    }

    @Deprecated
    public void ˋ(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
        printWriter.print(str);
        printWriter.print("mId=");
        printWriter.print(this.ˎ);
        printWriter.print(" mListener=");
        printWriter.println(this.ˋ);
        if (this.ॱ || this.ᐝ || this.ʽ) {
            printWriter.print(str);
            printWriter.print("mStarted=");
            printWriter.print(this.ॱ);
            printWriter.print(" mContentChanged=");
            printWriter.print(this.ᐝ);
            printWriter.print(" mProcessingChange=");
            printWriter.println(this.ʽ);
        }
        if (this.ˏ || this.ˊ) {
            printWriter.print(str);
            printWriter.print("mAbandoned=");
            printWriter.print(this.ˏ);
            printWriter.print(" mReset=");
            printWriter.println(this.ˊ);
        }
    }
}
